<script type="text/javascript" charset="utf-8">
    Cookies.set("EPGDomain", Authentication.CTCGetConfig("EPGDomain"));
    Cookies.set("UserID", Authentication.CTCGetConfig("UserID"));
    Cookies.set("UserToken", Authentication.CTCGetConfig("UserToken"));
    Cookies.set("STBType", Authentication.CTCGetConfig("STBType"));

    Cookies.set("order_type", "<%= @order_type %>");

    <% if defined? @epg_back_url  %>
        // 非常重要, 跳回机顶盒页面, 必须是这个写法!!!
        Cookies.set("epg_back_url", "<%= CGI.unescape(@epg_back_url).html_safe %>");
    <% end %>

    Cookies.set("platform", "<%= @platform %>");

    <% if defined? @code %>
        Cookies.set("code", "<%= @code %>")
    <% end %>
    
    window.location.href = "<%= @target_url.html_safe %>";
</script>
